﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 车辆浏览历史表基础输入参数
/// </summary>
public class AppVehicleViewHistoryBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 用户Id
    /// </summary>
    [Required(ErrorMessage = "用户Id不能为空")]
    public virtual long? UserId { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>
    [Required(ErrorMessage = "车辆Id不能为空")]
    public virtual long? VehicleId { get; set; }
    
    /// <summary>
    /// 浏览时间
    /// </summary>
    [Required(ErrorMessage = "浏览时间不能为空")]
    public virtual DateTime ViewTime { get; set; }
    
    /// <summary>
    /// 浏览时长
    /// </summary>
    public virtual int? Duration { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    [Required(ErrorMessage = "来源不能为空")]
    public virtual int? SourceType { get; set; }
    
    /// <summary>
    /// 设备信息
    /// </summary>
    public virtual string? DeviceInfo { get; set; }
    
    /// <summary>
    /// IP地址
    /// </summary>
    public virtual string? IpAddress { get; set; }
    
}

/// <summary>
/// 车辆浏览历史表分页查询输入参数
/// </summary>
public class PageAppVehicleViewHistoryInput : BasePageInput
{
    /// <summary>
    /// 用户Id
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 浏览时间范围
    /// </summary>
     public DateTime?[] ViewTimeRange { get; set; }
    
    /// <summary>
    /// 浏览时长
    /// </summary>
    public int? Duration { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    public int? SourceType { get; set; }
    
    /// <summary>
    /// 设备信息
    /// </summary>
    public string? DeviceInfo { get; set; }
    
    /// <summary>
    /// IP地址
    /// </summary>
    public string? IpAddress { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 车辆浏览历史表增加输入参数
/// </summary>
public class AddAppVehicleViewHistoryInput
{
    /// <summary>
    /// 用户Id
    /// </summary>
    [Required(ErrorMessage = "用户Id不能为空")]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>
    [Required(ErrorMessage = "车辆Id不能为空")]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 浏览时间
    /// </summary>
    [Required(ErrorMessage = "浏览时间不能为空")]
    public DateTime ViewTime { get; set; }
    
    /// <summary>
    /// 浏览时长
    /// </summary>
    public int? Duration { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    [Required(ErrorMessage = "来源不能为空")]
    public int? SourceType { get; set; }
    
    /// <summary>
    /// 设备信息
    /// </summary>
    [MaxLength(200, ErrorMessage = "设备信息字符长度不能超过200")]
    public string? DeviceInfo { get; set; }
    
    /// <summary>
    /// IP地址
    /// </summary>
    [MaxLength(50, ErrorMessage = "IP地址字符长度不能超过50")]
    public string? IpAddress { get; set; }
    
}

/// <summary>
/// 车辆浏览历史表删除输入参数
/// </summary>
public class DeleteAppVehicleViewHistoryInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 车辆浏览历史表更新输入参数
/// </summary>
public class UpdateAppVehicleViewHistoryInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 用户Id
    /// </summary>    
    [Required(ErrorMessage = "用户Id不能为空")]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>    
    [Required(ErrorMessage = "车辆Id不能为空")]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 浏览时间
    /// </summary>    
    [Required(ErrorMessage = "浏览时间不能为空")]
    public DateTime ViewTime { get; set; }
    
    /// <summary>
    /// 浏览时长
    /// </summary>    
    public int? Duration { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>    
    [Required(ErrorMessage = "来源不能为空")]
    public int? SourceType { get; set; }
    
    /// <summary>
    /// 设备信息
    /// </summary>    
    [MaxLength(200, ErrorMessage = "设备信息字符长度不能超过200")]
    public string? DeviceInfo { get; set; }
    
    /// <summary>
    /// IP地址
    /// </summary>    
    [MaxLength(50, ErrorMessage = "IP地址字符长度不能超过50")]
    public string? IpAddress { get; set; }
    
}

/// <summary>
/// 车辆浏览历史表主键查询输入参数
/// </summary>
public class QueryByIdAppVehicleViewHistoryInput : DeleteAppVehicleViewHistoryInput
{
}

/// <summary>
/// 车辆浏览历史表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAppVehicleViewHistoryInput : BaseImportInput
{
    /// <summary>
    /// 用户Id
    /// </summary>
    [ImporterHeader(Name = "*用户Id")]
    [ExporterHeader("*用户Id", Format = "", Width = 25, IsBold = true)]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 车辆Id
    /// </summary>
    [ImporterHeader(Name = "*车辆Id")]
    [ExporterHeader("*车辆Id", Format = "", Width = 25, IsBold = true)]
    public long? VehicleId { get; set; }
    
    /// <summary>
    /// 浏览时间
    /// </summary>
    [ImporterHeader(Name = "*浏览时间")]
    [ExporterHeader("*浏览时间", Format = "", Width = 25, IsBold = true)]
    public DateTime ViewTime { get; set; }
    
    /// <summary>
    /// 浏览时长
    /// </summary>
    [ImporterHeader(Name = "浏览时长")]
    [ExporterHeader("浏览时长", Format = "", Width = 25, IsBold = true)]
    public int? Duration { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    [ImporterHeader(Name = "*来源")]
    [ExporterHeader("*来源", Format = "", Width = 25, IsBold = true)]
    public int? SourceType { get; set; }
    
    /// <summary>
    /// 设备信息
    /// </summary>
    [ImporterHeader(Name = "设备信息")]
    [ExporterHeader("设备信息", Format = "", Width = 25, IsBold = true)]
    public string? DeviceInfo { get; set; }
    
    /// <summary>
    /// IP地址
    /// </summary>
    [ImporterHeader(Name = "IP地址")]
    [ExporterHeader("IP地址", Format = "", Width = 25, IsBold = true)]
    public string? IpAddress { get; set; }
    
}
